package com.example;


import org.openjdk.jol.info.ClassLayout;



public class JavaObjLayout {

    public static void main(String[] args) {

       //启用指针压缩:-XX:+UseCompressedOops，禁止指针压缩:-XX:-UseCompressedOops
        final Person person = new Person();
        System.out.println("hashCode(16进制):"+Integer.toHexString(person.hashCode()));
        System.out.println(ClassLayout.parseInstance(person).toPrintable());
    }

}
